/**
 * 
 */
package com.effectivsocial.web.controller;


import java.io.Serializable;

import javax.annotation.PostConstruct;
import javax.inject.Inject;
import javax.inject.Named;

import lombok.Getter;
import lombok.Setter;
import lombok.extern.slf4j.Slf4j;

import org.springframework.context.annotation.Scope;

import com.effectivsocial.core.i18n.I18nAware;
import com.effectivsocial.domain.Application;
import com.effectivsocial.service.api.ApplicationService;



/**
 * @author Dhrubo
 * 
 */
@Named
@Scope("view")
@Slf4j
public class NewApplicationForm implements Serializable{
	private static final long serialVersionUID = 1L;
	
	@Getter @Setter
	private Application application;
	
	@Inject
	private ApplicationService applicationService;
	
	@PostConstruct
	public void init(){
		application = new Application();
	}
	
	
	@I18nAware
	public void save(){
		applicationService.save(application);
	}
	
}
